/**
 * @Project PONTienLenMienNam
 * @Author Tran Manh Hung
 * @Email: hungtmit@gmail.com | tmh@xwebgate.com
 * @Copyright © 2011 TMH. All rights reserved
 * @Createdate May 10, 2011
 * @Createtime 10:28:37 AM
 */

package com.gigalaxy.game
{

	public class ExtensionCMD
	{
		public static var CREATE_ROOM:String="createRoom";
		public static var DEAL_CARDS:String="a";
		public static var FINISHED:String="d";
		public static var GIVE_UP:String="giveUp";
		public static var JOIN_ROOM:String="joinRoom";
		public static var ROUND_FINISHED:String="roundFinished";
		public static var START_BET:String="g";
		public static var BET:String="b"; // notify user in turn
		public static var OUT_OF_MONEY:String="outOfPon";
		public static var RESTART:String="restart";
		public static var SET_AVATAR:String="setAvatar";
		public static var SET_FULL_NAME:String="setFullName";
		public static var START:String="start";
		public static var USER_ENTER:String="userEnter";
		public static var USER_LEAVE:String="userLeave";
		public static var USER_LIST:String="userList";
		public static var CHARGE:String="$";
		public static var OWNER_CHANGE:String="ownerChange";
		public static var KICK:String="kick";
		public static var SET_PON_ID:String="setPonID";
		public static var CONFIG_GAME:String="cfg";
		public static var REVEAL_HAND:String="c"; // receiveCard
		/**
		 * chọn chương mới
		 */
		public static var CHOOSE_DEALER:String="e";
		public static var NEW_DEALER:String="f";
		public static var LEAVE_ROOM:String="leaveRoom";
		public static var SHUFFLE:String;

		public static function log(cmd:String):String
		{
			var res:String="";

			switch (cmd)
			{
				case CONFIG_GAME:
					res="configGame";
					break;
				case DEAL_CARDS:
					res="dealCard";
					break;
				case JOIN_ROOM:
					res="joinRoom";
					break;
				case USER_LIST:
					res="userList";
					break;
				case USER_ENTER:
					res="userEnter";
					break;
				case USER_LEAVE:
					res="userLeave";
					break;
				case OWNER_CHANGE:
					res="owerChange";
					break;
				case CHOOSE_DEALER:
					res="chooseDealer";
					break;
				case START:
					res="start";
					break;
				case START_BET:
					res="startBet";
					break;
				case BET:
					res="bet";
					break;
				case DEAL_CARDS:
					res="dealCards";
					break;
				case REVEAL_HAND:
					res="revealHand";
					break;
				case FINISHED:
					res="finished";
					break;
				case CHARGE:
					res="charge";
					break;
				case OUT_OF_MONEY:
					res="outOfMoney";
				case RESTART:
					res="restart";
					break;
				case KICK:
					res="kick";
					break;
				case LEAVE_ROOM:
					res="leaveRoom";
					break;
				default:
					res=cmd;
					break;
			}

			trace(res);
			return res;
		}
	}
}
